package com.cuixichang.minimalism.core.security.design;

import org.springframework.security.access.ConfigAttribute;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface RuleDefinitionDesign {

    /**
     * 忽略的请求路径
     * @return
     */
    default String[] ignoreRegular(){
       return new String[] {"/swagger*/**", "/refresh", "/bus/refresh", "/css/**", "/js/**",
               "/webjars/**","/v2/*","/images/**", "/layui/**"};
    }

    /**
     * 获取请求对应的权限信息
     * @param request
     * @return
     */
    List<ConfigAttribute> configAttributes(HttpServletRequest request, String mate);
}
